import request from '@/utils/request'
const baseUrl = '/prot/traceEasy'

export function getMachiningPage(pageParam) {
  return request({
    url: `${baseUrl}/getAll/${pageParam.pageNum}/${pageParam.pageSize}`,
    method: 'get'
  })
}

export function saveMachining(data) {
  return request({
    url: `${baseUrl}/addSell`,
    method: 'post',
    data: data
  })
}

export function searchMachining(data) {
  return request({
    url: `${baseUrl}/getAllById/${data}`,
    method: 'get'
  })
}

export function deleteMachiningById(id) {
  return request({
    url: `${baseUrl}/deleteSell/${id}`,
    method: 'delete'
  })
}

export function updateMachining(data) {
  return request({
    url: `${baseUrl}/putSell`,
    method: 'put',
    data: data
  })
}

export function getAllCompany() {
  return request({
    url: `${baseUrl}/getAll`,
    method: 'get'
  })
}
